package com.metal.gear.certification.entity.po;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.metal.gear.common.constant.DateTimeConstant;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 角色表
 * </p>
 *
 * @Author scott
 * @since 2018-12-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SysRole implements Serializable {

    private static final long serialVersionUID = 1L;


    @TableId(type = IdType.ASSIGN_ID)
    @Schema(name ="角色id，roleId")
    private String id;

    @ExcelProperty("角色名")
    @Schema(name ="角色名称")
    private String roleName;

    @ExcelProperty("角色编码")
    @Schema(name ="角色编码")
    private String roleCode;

    @ExcelProperty("描述")
    @Schema(name ="描述")
    private String description;

    @Schema(name ="创建人")
    private String createBy;

    @JsonFormat(timezone = "GMT+8", pattern = DateTimeConstant.DATETIME_FORMAT_HYPHEN)
    @DateTimeFormat(pattern = DateTimeConstant.DATETIME_FORMAT_HYPHEN)
    @Schema(name ="创建时间")
    private LocalDateTime createTime;

    @Schema(name ="更新人")
    private String updateBy;


    @JsonFormat(timezone = "GMT+8", pattern = DateTimeConstant.DATETIME_FORMAT_HYPHEN)
    @DateTimeFormat(pattern = DateTimeConstant.DATETIME_FORMAT_HYPHEN)
    @Schema(name ="更新时间")
    private Date updateTime;


}
